package com.newcoder.community.dao;

import com.newcoder.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * 评论的数据访问层
 *
 * ClassName:CommentMapper
 * Package:com.newcoder.community.dao
 *
 * @author: pf
 * @date: 2021/12/8-15:23
 */
@Mapper
@Repository
public interface CommentMapper {

    // 根据实体查询评论
    List<Comment> selectCommentsByEntity(int entityType, int entityId, int offset, int limit);

    // 根据实体查询数量
    int selectCountByEntity(int entityType, int entityId);


}
